package com.fc.test.controller;

import com.fc.test.common.base.BaseController;
import com.fc.test.common.domain.AjaxResult;
import com.fc.test.model.auto.Athing;
import com.fc.test.model.auto.ItemList;
import com.fc.test.model.custom.TitleVo;
import com.fc.test.service.AthingService;
import com.fc.test.service.ItemListService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;

/**
 * 如果有前台这儿写前台访问方法
 *
 * @author fuce
 * @ClassName: IndexController
 * @date 2019-10-21 00:15
 */
@Controller
@ApiIgnore
public class IndexController extends BaseController {



    /**
     * 前台访问 域名:端口 例如:localhost:80的get请求
     *
     * @param map
     * @return
     * @author fuce
     * @Date 2019年11月20日 下午10:55:13
     */
    @ApiOperation(value = "前台", notes = "前台")
    @GetMapping("/")
    public String index(ModelMap map) {
        String str = "前台";
        setTitle(map, new TitleVo("列表", str + "管理", true, "欢迎进入" + str + "页面", true, false));
        return "index";
    }

    /**
     * 前台访问/index的get请求
     *
     * @param map
     * @return
     * @author fuce
     * @Date 2019年11月20日 下午10:54:56
     */
    @ApiOperation(value = "前台", notes = "前台")
    @GetMapping("/index")
    public String index2(ModelMap map) {
        String str = "前台";
        setTitle(map, new TitleVo("列表", str + "管理", true, "欢迎进入" + str + "页面", true, false));
        return "index";
    }


}
